package apps

import (
	"github.com/beherochuling/beesoft_api/app/helper/net"
	"github.com/beherochuling/beesoft_api/app/model"
	appsModel "github.com/beherochuling/beesoft_api/app/model/apps"
	"github.com/beherochuling/beesoft_api/app/service"
	"github.com/beherochuling/beesoft_api/app/service/apps"
	"github.com/gogf/gf/v2/net/ghttp"
)

var Link link

type link struct{}

func (*link) List(r *ghttp.Request) {
	var req *appsModel.LinkListRequest
	service.Parse(r, &req)

	errCode, res := apps.Link.List(r.Context(), req)
	if errCode != model.SuccessCode {
		net.NewResponse(r).ResponseException(net.NewException(errCode))
	}
	net.NewResponse(r).ResponseOk(res)
}
